SPB Git forge

spb/polyllm

Public
15commits 1branches 0releases
2.2 MBsize
maindefault branch
13 days agolast push
TypeScript 97.4% SQL 1% JavaScript 0.9% CSS 0.6%
618 B · 15 lines typescript
Raw Blame History
1import { withUser, json } from "@/lib/api";2import { deleteArenaSession, getArenaSession } from "@/lib/arena/service";34export const dynamic = "force-dynamic";5type P = { id: string };67/** GET /api/arena/:id → { session } (responses + votes, owner only). */8export const GET = withUser<P>(async ({ user }, { id }) => json({ session: await getArenaSession(user.id, id) }));910/** DELETE /api/arena/:id → { ok } — removes the session, its responses, votes and share links. */11export const DELETE = withUser<P>(async ({ user }, { id }) => {12  await deleteArenaSession(user.id, id);13  return json({ ok: true });14});15